package com.xiaoyang.controller;

import com.xiaoyang.domain.Order;
import com.xiaoyang.feign.UserOrderFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @auther XiaoYang
 * @DATE 2023/5/5-17:56
 */
@RestController
public class UserController {

    @Resource
    private UserOrderFeign userOrderFeign;

    @GetMapping("/find/{id}")
    public Order findOrder(@PathVariable Integer id) {
        return userOrderFeign.getOrderByUserId(id);
    }

}
